/**
 * Product.js
 *
 * @description :: TODO: You might write a short summary of how this model works and what it represents here.
 * @docs        :: http://sailsjs.org/documentation/concepts/models-and-orm/models
 */
const uuid = require('node-uuid');
function generate_id() {
  var id = uuid.v4();
  return id.replace(/-/g, '');
}
module.exports = {

  tableName: 'product',
  attributes: {
    id: {
      type: 'string',
      required: true,
      primaryKey: true,
      defaultsTo: generate_id()
    },
    name: {
      type: 'string'
    },
    category: {
      type: 'string'
    },
    brand: {
      type: 'string'
    },
    model: {
      type: 'string'
    },
    remark: {
      type: 'string'
    }
  }
};

